package Thread;
//单例模式之懒汉模式；
class SingleTonLazy{
    private static SingleTonLazy instance=null;
    public static SingleTonLazy getInstance(){
        if(instance==null){
            synchronized (SingleTonLazy.class){
                if(instance==null){
                    instance=new SingleTonLazy();
                }
            }
        }
        return instance;
    }

}
public class Demo26 {
    public static void main(String[] args){

    }
}
